package edu.zut.hys.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import edu.zut.hys.base.service.UserRoleService;
import edu.zut.hys.base.entity.UserRole;
import edu.zut.hys.base.mapper.UserRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author houyingsheng
* @description 针对表【user_role】的数据库操作Service实现
* @createDate 2023-01-05 23:28:37
*/
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole>
    implements UserRoleService {
    @Autowired
    UserRoleMapper userRoleMapper;

    @Override
    public List<UserRole> listByUserid(Long userid) {
        return userRoleMapper.selectList(new QueryWrapper<UserRole>().eq("userid",userid));
    }
}




